import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
/* 引入element-ui组件库 */
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// axios.defaults.baseURL = 'http://www.liulongbin.top:3008'
// Vue.prototype.$http = axios
// var instance = axios.create({
//   baseURL: 'http://www.liulongbin.top:3008',
//   timeout: 1000,
//   headers: { 'X-Custom-Header': 'foobar' }
// })
import './assets/global.css'

/* 注册公共组件 */
// import bread from '@/components/bread'

// Vue.filter('forMat', (msg) => {
//   console.log(msg, 7766)
//   var data = new Date(msg)
//   var y = data.getFullYear()
//   var m = data.getMonth() + 1
//   var d = data.getDate()
//   var hh = data.getHours()
//   var mm = data.getMinutes()
//   var ss = data.getSeconds()
//   // console.log(y, h, 8)
//   return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
// })

import * as dayjs from 'dayjs'

import '@/components/index.js'

// import pubArt from '@/components/pubArt'
// Vue.component('pubArt', pubArt)
// 富文本组件的注册
import VueQuillEditor from 'vue-quill-editor'
// require styles
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(VueQuillEditor /* { default global options } */)

Vue.filter('forMat', (msg) => {
  //  msg是原始数据
  return dayjs(msg).format('YYYY-MM-DD HH:mm:ss')
})

// import axios from 'axios'
Vue.use(ElementUI)
// Vue.component('bread', bread)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
